#ifndef VENTILADOR_H
#define VENTILADOR_H

#include <QGraphicsRectItem>
#include <QImage>
#include <QPainter>
#include <QtCore>
#include <QGraphicsProxyWidget>
#include <QSlider>

class Ventilador: public QObject, public QGraphicsRectItem
{
    Q_OBJECT
    Q_PROPERTY(qreal rotation READ rotation WRITE setRotation)
public:
    bool status;
    Ventilador();
    void changeStatus();

protected:
    void paint( QPainter *, const QStyleOptionGraphicsItem *option, QWidget *widget );
    void mousePressEvent(QGraphicsSceneMouseEvent *event);

private:
    QImage *ventilador_img;
    QPropertyAnimation *anim, *anim2;
    QGraphicsProxyWidget *proxy;
    QSlider *horizontal_slider;
    QString *img_path;

};

#endif // VENTILADOR_H
